import request from '../utils/request'
import qs from 'qs'

let api = {
  // 登录接口
  loginApi(data) {
    return request({
      url: '/caict/user/login',
      method: 'post',
      data,
    })
  },
  // 短信验证码登录
  loginBySms(data) {
    return request({
      url: '/caict/user/smsLogin',
      method: 'post',
      data,
    })
  },
  // 短信验证码 获取验证码
  getLoginCode(data) {
    return request({
      url: '/caict/user/sendPhoneCode',
      method: 'post',
      data,
    })
  },

  // 报告页菜单
  getReportListForIndex(params) {
    return request({
      url: '/caict/statisticReport/getReportListForIndex',
      method: 'get',
      params,
    })
  },
  // 发送邮件
  sendReportMail(data) {
    return request({
      url: '/caict/statisticReport/sendReportMail',
      method: 'post',
      data,
    })
  },

  // 获取上次邮件发送地址字符串
  getLastReportMail(params) {
    return request({
      url: '/caict/statisticReport/getLastReportMail',
      method: 'post',
      params,
    })
  },

  // 获取页面内容
  getReportSectionContentByFirstLevel(params) {
    return request({
      url: 'caict/statisticReport/getReportSectionContentByFirstLevel',
      method: 'get',
      params,
    })
  },
  // 保存页面
  savePreprocessReportHtml(data) {
    return request({
      url: 'caict/statisticReport/savePreprocessReportHtml',
      method: 'post',
      data,
    })
  },
  // 获取树形数据
  getReportIndexListByReportId(params) {
    return request({
      url: '/caict/statisticReport/getReportIndexListByReportId',
      method: 'get',
      params,
    })
  },
  // 获取home页面文档
  getReportHtmlPages(params) {
    return request({
      url: '/caict/statisticReport/getReportHtmlPages',
      method: 'get',
      params,
    })
  },
  getZone(params) {
    return request({
      url: '/caict/areaAnalysis/getZone',
      method: 'get',
      params,
    })
  },

  // 获取 街道数据
  getTownByZoneId(data) {
    return request({
      url: '/caict/userAnalysis/getTownByZoneId',
      method: 'post',
      data,
    })
  },

  // 获取 搜索词数据
  getSearchWordList(data) {
    return request({
      url: '/caict/userAnalysis/getKeyWordByParam',
      method: 'post',
      data,
    })
  },

  // 获取 搜索词 top数据
  getAllKeyWordsTop10(data) {
    return request({
      url: '/caict/userAnalysis/getAllKeyWordsTop10',
      method: 'post',
      data,
    })
  },

  // 增加自定义场景
  addScene(params) {
    return request({
      url: '/caict/customSceneAnalysis/addScene',
      method: 'get',
      params,
    })
  },
  // 删除自定义场景
  deleteScene(params) {
    return request({
      url: '/caict/customSceneAnalysis/deleteScene',
      method: 'get',
      params,
    })
  },
  // 自定义场景列表
  getScene(params) {
    return request({
      url: '/caict/customSceneAnalysis/getScene',
      method: 'get',
      params,
    })
  },
  // 根据场景查看数据分析
  getSceneData(params) {
    return request({
      url: '/caict/customSceneAnalysis/getSceneData',
      method: 'get',
      params,
    })
  },
  // 修改图表分析是否生成
  updateDataAnalysis(params) {
    return request({
      url: '/caict/customSceneAnalysis/updateDataAnalysis',
      method: 'get',
      params,
    })
  },
  updateScene(params) {
    return request({
      url: '/caict/customSceneAnalysis/updateScene',
      method: 'get',
      params,
    })
  },
  getStationBusinessHallPage(params) {
    return request({
      url: '/caict/reference/getStationBusinessHallPage',
      method: 'get',
      params,
    })
  },
  getReferenceByType(params) {
    return request({
      url: '/caict/reference/getReferenceByType',
      method: 'get',
      params,
    })
  },

  // 保存 对标城市列表
  saveMarkCityList(data) {
    return request({
      url: '/caict/markCity/saveMarkCityList',
      method: 'post',
      data,
    })
  },

  // 获取 对标城市列表
  getMarkCityList(data) {
    return request({
      url: '/caict/markCity/getMarkCityList',
      method: 'post',
      data,
    })
  },

  // 删除 某一对标城市
  delMarkCity(data) {
    return request({
      url: '/caict/markCity/delMarkCity',
      method: 'post',
      data,
    })
  },

  // 获取 可选对标城市列表库
  getProvinceCity(data) {
    return request({
      url: '/caict/markCity/getProvinceCity',
      method: 'post',
      data,
    })
  },

  // 获取 报告是否生成的状态  0 无生成
  getReportByStatus(data) {
    return request({
      url: '/caict/statisticReport/getReportByStatus',
      method: 'post',
      data,
    })
  },

  // 获取上次导入工参时间
  getReferenceLastTime(data) {
    return request({
      url: '/caict/reference/getReferenceLastTime',
      method: 'post',
      data,
    })
  },

  // 获取基础配置 配置列表
  getCityMncConfig(data) {
    return request({
      url: '/caict/cityMncConfig/getCityMncConfig',
      method: 'post',
      data,
    })
  },

  // 更新 基础配置 的配置
  updateCityMncConfig(data) {
    return request({
      url: '/caict/cityMncConfig/updateCityMncConfig',
      method: 'post',
      data,
    })
  },

  // 更新 跳转路由的操作
  updateOperatLog(params) {
    return request({
      url: '/caict/user/operatLog',
      method: 'get',
      params,
    })
  },

  // 获取 跳转路由的操作列表
  getQueryOperatLogList(params) {
    return request({
      url: '/caict/user/queryOperatLogList',
      method: 'get',
      params,
    })
  },

  // 获取 省市列表
  getAllProvinceCity(params) {
    return request({
      url: '/caict/superAccountSetting/getAllProvinceCity',
      method: 'get',
      params,
    })
  },

  // 获取 场景录入 搜索词列表
  getMapSearch(params) {
    return request({
      url: '/caict/superAccountSetting/getMapSearch',
      method: 'get',
      params,
    })
  },

  // 新增 场景录入
  addArea(data) {
    return request({
      url: '/caict/superAccountSetting/addArea',
      method: 'post',
      data,
    })
  },

  // 获取当前区县列表
  getZoneByCity(params) {
    return request({
      url: '/caict/superAccountSetting/getZoneByCity',
      method: 'post',
      params,
    })
  },

  // 获取邮箱数据
  getEmailManage(data) {
    return request({
      url: '/caict/user/queryEmailManage',
      method: 'post',
      data,
    })
  },

  // 保存邮箱数据
  saveEmailManage(data) {
    return request({
      url: '/caict/user/saveEmailManage',
      method: 'post',
      data,
    })
  },

  // 自定义场景 获取场景类型
  getAreaType(params) {
    return request({
      url: '/caict/superAccountSetting/getAreaType',
      method: 'get',
      params,
    })
  },

  // 自定义场景 更新场景边界
  updateArea(data) {
    return request({
      url: '/caict/superAccountSetting/updateArea',
      method: 'post',
      data,
    })
  },

  // 自定义场景 获取场景边界列表
  queryAreaList(data) {
    return request({
      url: '/caict/superAccountSetting/queryAreaList',
      method: 'post',
      data,
    })
  },
  // 自定义场景 查询所有场景
  queryCustomizeAreaBoundary(data) {
    return request({
      url: '/caict/superAccountSetting/queryCustomizeAreaBoundary',
      method: 'post',
      data,
    })
  },
  // 自定义场景 获取场景边界列表
  queryCustomizeAreaPage(data) {
    return request({
      url: '/caict/superAccountSetting/queryCustomizeAreaPage',
      method: 'post',
      data,
    })
  },

  // 自定义场景 删除场景边界
  delArea(data) {
    return request({
      url: '/caict/superAccountSetting/delArea',
      method: 'post',
      data,
    })
  },
  // 自定义场景 生成统计
  statisticsScene(data) {
    return request({
      url: '/caict/superAccountSetting/statisticsScene',
      method: 'post',
      data,
    })
  },

  // 获取 自定义场景 当前区
  getZoneByBoundaries(params) {
    return request({
      url: '/caict/superAccountSetting/getZoneByBoundaries',
      method: 'get',
      params,
    })
  },

  // 获取 网格列表
  getNetworkGridByCity(params) {
    return request({
      url: '/caict/superAccountSetting/getNetworkGridByCity',
      method: 'get',
      params,
    })
  },
  // 获取 微格列表
  getMicroByCity(params) {
    return request({
      url: '/caict/superAccountSetting/getMicroByCity',
      method: 'get',
      params,
    })
  },
  // 获取树形数据
  getReportTableListByReportId(params) {
    return request({
      url: '/caict/statisticReport/getReportTableListByReportId',
      method: 'get',
      params,
    })
  },

  //获取表格数据
  queryTableData(params) {
    return request({
      url: '/caict/downReport/queryTableData',
      method: 'get',
      params,
    })
  },
}

export default api
